<template>
  <div>
    <form ref="form">
      <input type="text" placeholder="请输入用户名" ref="input1">
      <input type="text"  placeholder="请输入用户名"  ref="input2">
    </form>
  </div>
</template>

<script>
export default {
  mounted(){
    
  },
  methods:{
    fn(){
      console.log(this.$refs.input1.value+this.$refs.input2.value);
    }
  }
}
</script>

<style>

</style>